package com.dc.project.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dc.common.validated.DeleteGroup;
import com.dc.common.validated.InsertGroup;
import com.dc.common.validated.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 用户岗位关联表(SysUserPost)实体类
 *
 * @author zhuangcy
 * @since 2021-06-08 12:36:58
 */
@TableName("sys_user_post")
@Data
@ApiModel(value = "用户岗位关联表")
public class SysUserPost implements Serializable {
    private static final long serialVersionUID = 520001353251652048L;
    /**
     * 用户岗位id
     */
    @NotNull(message = "用户岗位id不能为空", groups = {UpdateGroup.class, DeleteGroup.class})
    @TableId(value = "user_post_id", type = IdType.AUTO)
    @ApiModelProperty(name = "userPostId", value = "用户岗位id")
    private Long userPostId;
    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "user_id")
    @ApiModelProperty(name = "userId", value = "用户id")
    private Integer userId;
    /**
     * 岗位id
     */
    @NotNull(message = "岗位id不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "post_id")
    @ApiModelProperty(name = "postId", value = "岗位id")
    private Integer postId;


}